<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Minikombajn Pomiarowy: Dokumentacja pliku /home/arek/Dokumenty/AVRprograms/MKP_3_7/ADC.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Wygenerowano przez Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Szukaj');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Minikombajn Pomiarowy&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Strona&#160;główna</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Szukaj" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Funkcje</a>  </div>
  <div class="headertitle">
<h1>Dokumentacja pliku /home/arek/Dokumenty/AVRprograms/MKP_3_7/ADC.h</h1>  </div>
</div>
<div class="contents">

<p>Plik naglowkowy obslugi przetwornika ADC.  
<a href="#_details">Więcej...</a></p>

<p><a href="_a_d_c_8h_source.html">Idź do kodu źródłowego tego pliku.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Funkcje</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#a39150f192703c8fc5f1885bc21deee7f">ADCInit</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja inicjujaca ADC.  <a href="#a39150f192703c8fc5f1885bc21deee7f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#ab5c3e39cdf03dad301f30071f9ad7189">ADCOff</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja wylaczajaca ADC.  <a href="#ab5c3e39cdf03dad301f30071f9ad7189"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#a672b9840360c3d1f86103664a6f5f1f9">ADCGetCh0</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja odczytujaca kanal 0 ADC.  <a href="#a672b9840360c3d1f86103664a6f5f1f9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#a7a8ebca359988cd6fc63f013d6237b7b">ADCGetCh1</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja odczytujaca kanal 1 ADC.  <a href="#a7a8ebca359988cd6fc63f013d6237b7b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#ac0f41859c99f66503a0a1993cbc69ab3">ADCGetCh2</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja odczytujaca kanal 2 ADC.  <a href="#ac0f41859c99f66503a0a1993cbc69ab3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#aa524ccccd4f3e75ad29709f4ffd2ec69">ADCSetPeroid</a> (uint8_t per)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja ustawiajaca podstawe czasu.  <a href="#aa524ccccd4f3e75ad29709f4ffd2ec69"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#a760ba43bab21390957aa1cebeabcd5a2">ADCSetGain</a> (uint8_t g1, uint8_t g2)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja ustawiajaca wzmocnienie.  <a href="#a760ba43bab21390957aa1cebeabcd5a2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#a4af9e949e7b205fa32bb6716cd047efb">ADCRunOffsetCal</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja kalibrujaca offset sygnalu wejsciowego.  <a href="#a4af9e949e7b205fa32bb6716cd047efb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_a_d_c_8h.html#a9289369c3e42d65d8796f9282e9a9b62">ADCOffsetCorrect</a> (int16_t *wsk, uint8_t channels, uint8_t vdiv1, uint8_t vdiv2)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja korygujaca sygnal na podstawie danych kalibracyjnych.  <a href="#a9289369c3e42d65d8796f9282e9a9b62"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Opis szczegółowy</h2>
<div class="textblock"><p>Plik naglowkowy obslugi przetwornika ADC. </p>
<dl class="author"><dt><b>Autor:</b></dt><dd>Arkadiusz Hudzikowski </dd></dl>
<dl class="version"><dt><b>Wersja:</b></dt><dd>1.0 </dd></dl>
<dl class="date"><dt><b>Data:</b></dt><dd>22.11.2011 </dd></dl>
</div><hr/><h2>Dokumentacja funkcji</h2>
<a class="anchor" id="a672b9840360c3d1f86103664a6f5f1f9"></a><!-- doxytag: member="ADC.h::ADCGetCh0" ref="a672b9840360c3d1f86103664a6f5f1f9" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int16_t ADCGetCh0 </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja odczytujaca kanal 0 ADC. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>int16_t : odczytana wartosc </dd></dl>

</div>
</div>
<a class="anchor" id="a7a8ebca359988cd6fc63f013d6237b7b"></a><!-- doxytag: member="ADC.h::ADCGetCh1" ref="a7a8ebca359988cd6fc63f013d6237b7b" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int16_t ADCGetCh1 </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja odczytujaca kanal 1 ADC. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>int16_t : odczytana wartosc </dd></dl>

</div>
</div>
<a class="anchor" id="ac0f41859c99f66503a0a1993cbc69ab3"></a><!-- doxytag: member="ADC.h::ADCGetCh2" ref="ac0f41859c99f66503a0a1993cbc69ab3" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int16_t ADCGetCh2 </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja odczytujaca kanal 2 ADC. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>int16_t : odczytana wartosc </dd></dl>

</div>
</div>
<a class="anchor" id="a39150f192703c8fc5f1885bc21deee7f"></a><!-- doxytag: member="ADC.h::ADCInit" ref="a39150f192703c8fc5f1885bc21deee7f" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADCInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja inicjujaca ADC. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="ab5c3e39cdf03dad301f30071f9ad7189"></a><!-- doxytag: member="ADC.h::ADCOff" ref="ab5c3e39cdf03dad301f30071f9ad7189" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADCOff </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja wylaczajaca ADC. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a9289369c3e42d65d8796f9282e9a9b62"></a><!-- doxytag: member="ADC.h::ADCOffsetCorrect" ref="a9289369c3e42d65d8796f9282e9a9b62" args="(int16_t *wsk, uint8_t channels, uint8_t vdiv1, uint8_t vdiv2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADCOffsetCorrect </td>
          <td>(</td>
          <td class="paramtype">int16_t *&#160;</td>
          <td class="paramname"><em>wsk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>channels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>vdiv1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>vdiv2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja korygujaca sygnal na podstawie danych kalibracyjnych. </p>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">*wsk</td><td>: adres bufora sygnalu </td></tr>
    <tr><td class="paramname">channels</td><td>: 0 - praca 1 kanalowa, 1 - praca dwukanalowa </td></tr>
    <tr><td class="paramname">vdiv1</td><td>: wzmocnienie kanalu 1 </td></tr>
    <tr><td class="paramname">vdiv2</td><td>: wzmocnienie kanalu 2 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a4af9e949e7b205fa32bb6716cd047efb"></a><!-- doxytag: member="ADC.h::ADCRunOffsetCal" ref="a4af9e949e7b205fa32bb6716cd047efb" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADCRunOffsetCal </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja kalibrujaca offset sygnalu wejsciowego. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a760ba43bab21390957aa1cebeabcd5a2"></a><!-- doxytag: member="ADC.h::ADCSetGain" ref="a760ba43bab21390957aa1cebeabcd5a2" args="(uint8_t g1, uint8_t g2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADCSetGain </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>g1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>g2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja ustawiajaca wzmocnienie. </p>
<p>wartosc wzmocnienia wynosi 2^gx, gdzie gx to parametr podawany w funkcji </p>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">g1</td><td>: wartosc wzmocnienia dla kanalu 1 (ch0) </td></tr>
    <tr><td class="paramname">g2</td><td>: wartosc wzmocnienia dla kanalu 2 (ch1) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="aa524ccccd4f3e75ad29709f4ffd2ec69"></a><!-- doxytag: member="ADC.h::ADCSetPeroid" ref="aa524ccccd4f3e75ad29709f4ffd2ec69" args="(uint8_t per)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADCSetPeroid </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>per</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja ustawiajaca podstawe czasu. </p>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">per</td><td>: numer wybranej podstawy czasu </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Pliki</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Funkcje</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Zmienne</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Definicje</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Wygenerowano Fri Dec 30 2011 17:28:02 dla Minikombajn Pomiarowy programem&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
